projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40014fe
)
* test/automated/subr-tests.el (subr-test-when): Fix test
author
Artur Malabarba
<bruce.connor.am@gmail.com>
Fri, 6 Nov 2015 11:18:23 +0000
(11:18 +0000)
committer
Artur Malabarba
<bruce.connor.am@gmail.com>
Fri, 6 Nov 2015 11:18:23 +0000
(11:18 +0000)
test/automated/subr-tests.el
patch
|
blob
|
history
diff --git
a/test/automated/subr-tests.el
b/test/automated/subr-tests.el
index 85d5d112d9e80dc6bac80794cf65f946cfea2aac..e782f7b1ee1150a27d277dab687f272a5448eab7 100644
(file)
--- a/
test/automated/subr-tests.el
+++ b/
test/automated/subr-tests.el
@@
-91,8
+91,15
@@
(should (equal (when t 'x 2) 2))
(should (equal (when nil 'x 1) nil))
(should (equal (when nil 'x 2) nil))
- (should (equal (macroexpand-all '(when a b))
- '(if a b)))
+ (let ((x 1))
+ (should-not (when nil
+ (setq x (1+ x))
+ x))
+ (should (= x 1))
+ (should (= 2 (when true
+ (setq x (1+ x))
+ x)))
+ (should (= x 2)))
(should (equal (macroexpand-all '(when a b c d))
'(if a (progn b c d)))))